package com.example.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.experimental.Accessors;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author およそ神
 * @version JDK 1.8
 */
@Data
@AllArgsConstructor
@Accessors(chain = true)//链式写法
public class PersonDTO implements Serializable {
   private Integer id;
   private String name;
   private Integer age;
   //@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
   @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  // @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
   private Date updatetime;
   private String updateby;
   private String test;
   public PersonDTO() {
      this.updatetime = new Date();
   }
}
